<template>
	<view>
		<ticket-item @submit="createTicket"></ticket-item>
	</view>
</template>

<script>
	import TicketItem from '@/components/ticketItem.vue'
	export default {
		components: {
			TicketItem
		},
		data() {
			return {
				TicketItem
			}
		},
		methods: {
			createTicket(params) {
				uni.showLoading({
					title: '提交中',
					mask: true
				})
				params.工单类型 = 'I'
				this.$http2.post('ticketSystem/ticket/submit', params).then(res => {
					console.log(res)
					if (res.code === 10000) {
						uni.redirectTo({
							url: '../success/success?path=../index/index' + '&title=返回报事页面'
						})
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	// .feedback-container {
	// 	background-color: #f5f5f5;
	// 	height: 100vh;
	// }
</style>
